<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-FRAME-OPTIONS" content="DENY">
  {% block head %}
  <title>{% block title %}{% endblock %} - HardCoded Store</title>
  {% endblock %}
</head>
<body>
  <div id="header">
    <div id="login_bar">
      {# todo: rewrite #}
      {% set current_user = m_User.get_current_user() %}
      {% if current_user %}
      Hello, <a href="/user/{{ current_user.key().id()|e }}">{{ current_user.user.nickname()|e }}</a>{% if current_user.admin %} <b>(<a href="/_admin/">admin</a>)</b>{% endif %}.
      <a href="{{ m_users.create_logout_url("")|e }}">Logout</a>
      {% else %}
      <a href="{{ m_users.create_login_url("")|e }}">Login</a>
      {% endif %}
    </div>
  </div>
  <div id="content">{% block content %}{% endblock %}</div>
</body>
</html>
